link-button: Add ::activate-link signal
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 14 Oct 2010 14:22:19 +0000 (15:22 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 15 Oct 2010 09:36:01 +0000 (10:36 +0100)
commit17ffcb0cc685e427065c04ac2eea6a854b33eaab
tree13ab229c3ff5296a43492ca2e79a1dd89421e3e5
parentd7c7f010b026003d50669a567bd5136e3eef7869
link-button: Add ::activate-link signal

We cannot use the GtkButton::clicked signal to override the default
behavior of GtkLinkButton (i.e. call gtk_show_uri()), because
GtkButton::clicked is registered as a RUN_FIRST signal, which obviously
prevents any other signal handler connected to it to stop the
propagation before the class handler has a chance to run.

For this reason we can add a GtkLinkButton::activate-link signal, which
will be emitted by the default GtkButton::clicked signal handler; the
::activate-link signal has a boolean return value, which allows simpler
code for stopping the propagation to the next signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=632150
gtk/gtklinkbutton.c
gtk/gtklinkbutton.h